//
//  NEDReachabilityManager.h
//  NEDNetwork
//
//  Created by 000 on 2021/12/25.
//

#import <Foundation/Foundation.h>
#import <AFNetworking/AFNetworkReachabilityManager.h>

NS_ASSUME_NONNULL_BEGIN

@class AFNetworkReachabilityManager;

typedef NS_ENUM(NSInteger, NEDNetworkStatus) {
    NEDNetworkStatusUnknown          = AFNetworkReachabilityStatusUnknown,
    NEDNetworkStatusNotReachable     = AFNetworkReachabilityStatusNotReachable,
    NEDNetworkStatusReachableViaWWAN = AFNetworkReachabilityStatusReachableViaWWAN,
    NEDNetworkStatusReachableViaWiFi = AFNetworkReachabilityStatusReachableViaWiFi,
};

@interface NEDReachabilityManager : NSObject
/// 网络变化
+ (void)networkChangeBlock:(void(^)(NEDNetworkStatus status, NSString * description))block;

+ (NEDNetworkStatus)networkReachabilityStatus;
+ (BOOL)reachable;
+ (BOOL)reachableViaWWAN;
+ (BOOL)reachableViaWiFi;

@end

NS_ASSUME_NONNULL_END
